package org.lanqiao.oa.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {
    private static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    /**
     * 获取当前时间的字符串
     * @return
     */
    public static String getNowDataStr(){
        return format.format(new Date());
    }

    /**
     * 比较时间
     * @param date
     * @return
     */
    public static boolean isDate(String date){
        System.out.println("当前"+getNowDataStr());
        System.out.println("传递"+date);
        if(date!=null && date!="" && getNowDataStr().compareTo(date)<0){
            return false;
        }
        return true;
    }

}
